<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的车场(地锁)</title>
    <link href="../../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="../../css/myYard.css" rel="stylesheet" type="text/css" />
    <script src="../../lib/jquery-3.3.1.min.js" type="text/javascript" ></script>
    <script src="../../lib/layui/layui.js" type="text/javascript" ></script>
    <script src="../../lib/jquery.qrcode.min.js" type="text/javascript" ></script>
    <script src="../../js/cdsideparkmgr/clock.js" type="text/javascript" ></script>
    <script src="../../js/cdsideparkmgr/myProject.js" type="text/javascript" ></script>
    <script type="text/html" id="barOperate">
        {{# if(d.projectStatus == 2){ }}
        <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail">详情</button>
        <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</button>
        <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="employee">项目员工</button>
        <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="charge">收费配置</button>
        {{# } }}
        {{# if(d.projectStatus !== 2){ }}
        <button class="layui-btn layui-btn-normal layui-btn-xs layui-btn-disabled" disabled lay-event="detail">详情</button>
        <button class="layui-btn layui-btn-normal layui-btn-xs layui-btn-disabled" disabled lay-event="edit">编辑</button>
        <button class="layui-btn layui-btn-normal layui-btn-xs layui-btn-disabled" disabled lay-event="employee">项目员工</button>
        <button class="layui-btn layui-btn-normal layui-btn-xs layui-btn-disabled" disabled lay-event="charge">收费配置</button>
        {{# } }}
    </script>
    <script type="text/html" id="barOperate2">
        <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete">删除</a>
    </script>
    <script type="text/html" id="barOperate3">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="passCategory">通行车类</a>
    </script>
    <script type="text/html" id="barOperate4">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    </script>
    <script type="text/html" id="barDownload">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="download">下载</a>
    </script>
    <style>
        /*定位*/
        .map-location{
            width: 28px;
            height: 30px;
            position: absolute;
            top: 8px;
            right: 0px;
            z-index: 5;
            font-size: 18px;
            cursor: pointer;
        }
        .map-location-input{
            padding-right: 30px;
        }
    </style>
</head>
<body class="layui-layout-body" style="background-color:white;padding: 10px">
    <div id="addCarDiv" style="display: none">
        <form class="layui-form"  id="car_form" style="margin-top:1%">
            <input type="hidden" id="id" name="id">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">项目名称:</label>
                    <div class="layui-input-inline" >
                        <input autocomplete="off" name="projectName" id="projectName" type="text" class="layui-input" placeholder="车场名称" lay-verify="required"/>
                    </div>
                    <label class="layui-form-label">客服电话:</label>
                    <div class="layui-input-inline" >
                        <input autocomplete="off" name="kfdh" id="kfdh" type="text" class="layui-input" placeholder="客服电话" lay-verify="required"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">项目位置:</label>
                <div class="layui-input-inline">
                    <input class="layui-input" name="addressDetail" id="locationName" autocomplete="off" lay-verify="required"/>
                    <div id="locationBtn" class="layui-icon layui-icon-location map-location"></div>
                </div>
                <label class="layui-form-label">车位总数:</label>
                <div class="layui-input-inline" >
                    <input autocomplete="off" name="carNum" id="carNum" type="text" class="layui-input" placeholder="车位总数" lay-verify="required||number"/>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">负责人:</label>
                    <div class="layui-input-inline" >
                        <input autocomplete="off" name="managerName" id="managerName" type="text" class="layui-input" placeholder="车场负责人" lay-verify="required"/>
                    </div>
                    <label class="layui-form-label">联系电话:</label>
                    <div class="layui-input-inline" >
                        <input autocomplete="off" name="managerPhone" id="managerPhone" type="text" class="layui-input" placeholder="联系电话" lay-verify="required||phone"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">项目概述:</label>
                <div class="layui-input-inline">
                    <textarea class="layui-textarea" name="projectDesc" id="projectDesc" autocomplete="off" style="width: 501px"></textarea>
                </div>
            </div>
            <div class='layui-input-block' >
                <button class="layui-btn" id="updateYardForm" lay-submit="" lay-filter="updateYardForm">保存</button>
                <button class="layui-btn"  id="cancel_form">取消</button>
            </div>

        </form>
    </div>
    <!--车场员工 -->
    <div id="employeeMgrDiv" style="display: none">
        <form class="layui-form"  id="employee_form" style="margin-top:1%">
            <input type="hidden" id="yardId" name="yardId">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">角色:</label>
                    <div class="layui-input-inline" >
                        <select lay-verify="required" name="roleId" id="roleId" lay-filter="roleId"></select>
                    </div>
                    <label class="layui-form-label">人员:</label>
                    <div class="layui-input-inline" >
                        <select lay-verify="required" name="userId" id="userId" lay-filter="userId"></select>
                    </div>
                </div>
                <button class="layui-btn" id="addEmployee" lay-submit="" lay-filter="addEmployee">增加</button>
            </div>
            <table id="employeeTable" lay-filter="employeeTable" style="width: 100%;"></table>

        </form>
    </div>
    <!--收费规则配置 -->
    <div id="chargeConfigDiv" style="display: none">
        <form class="layui-form" id="charge_form" style="margin-top:1%">
            <input type="hidden" id="ruleYardId" name="yardId">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">收费规则:</label>
                    <div class="layui-input-inline" >
                        <select lay-verify="required" name="ruleId" id="ruleId" lay-filter="ruleId">
                        </select>
                    </div>
                </div>
            </div>
            <div class='layui-input-block' >
                <button class="layui-btn" id="addCharge" lay-submit="" lay-filter="addCharge">保存</button>
                <button class="layui-btn" type="button" id="cancel_charge_form">取消</button>
            </div>

        </form>
    </div>

    <div id="qrcodeShowDiv" style="display: none">
        <form class="layui-form" id="qrcodeShowForm" style="margin-top:5px;margin-left: 10px">
            <input type="hidden" id="qrcodeTitle"/>
            <div class="qrcode" style="display:none;text-align: center;margin-top: 1rem;"></div>
            <img class="qrcodeImg" style='border:1px solid red;'/>
            <a target="_blank" class="layui-btn download">点击下载</a>
        </form>
    </div>

    <div class="layui-tab-brief" lay-filter="docDemoTabBrief">
        <div style="margin-left:5px;margin-top:10px; height: 45px">
            <form class="layui-form">
                <div class="layui-inline">
                    <div class="layui-input-inline">项目名称:</div>
                    <div class="layui-input-inline" >
                        <input class="layui-input" id="searchName" autocomplete="off"
                               placeholder="项目名称">
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">项目编号:</div>
                    <div class="layui-input-inline" >
                        <input class="layui-input" id="searchCode" autocomplete="off"
                               placeholder="项目编号">
                    </div>
                </div>
                <div class="layui-inline" >
                    <button class="layui-btn" lay-submit="" lay-filter="queryYard" >查询</button>
                    <button class="layui-btn" type="reset" >重置</button>
                    <div class="layui-input-inline" id="sbqk" style="cursor: pointer">设备在线:
                        <label id="onlineDevice" style="color: green">0</label>/<label id="allDevice">0</label>
                    </div>
                </div>

            </form>
            <table id="myYardTable" lay-filter="myYardTable" style="width: 100%;"></table>

        </div>
    </div>

    <div id="yardDiv" style="display: none">
        <form class="layui-form"  id="yard_form" style="margin-top:1%">
            <input type="hidden" id="projectId" >
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 130px">项目名称:</label>
                    <div class="layui-input-inline">
                        <label class="layui-form-label2" id="projectName2"></label>
                    </div>
                    <label class="layui-form-label" style="width: 130px">项目位置:</label>
                    <div class="layui-input-inline">
                        <label class="layui-form-label2" style="width: 200px" id="addressDetail"></label>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 130px">车场负责人:</label>
                    <div class="layui-input-inline">
                        <label class="layui-form-label2" id="managerName2"></label>
                    </div>
                    <label class="layui-form-label" style="width: 130px">联系电话:</label>
                    <div class="layui-input-inline">
                        <label class="layui-form-label2" id="managerPhone2"></label>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 130px">项目概述:</label>
                    <div class="layui-input-inline">
                        <div class="detail-content">
                            <div class="detail-left" id="projectDesc2">
                            </div>
                        </div>
                    </div>
                    <label class="layui-form-label" style="width: 130px">设备在线:</label>
                    <div class="layui-input-inline">
                        <label class="layui-form-label2" id="sbzx"></label>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 130px">车位总数:</label>
                    <div class="layui-input-inline">
                        <label class="layui-form-label2" id="carNum2"></label>
                    </div>
                    <label class="layui-form-label" style="width: 130px">收费规则:</label>
                    <div class="layui-input-inline">
                        <label class="layui-form-label2" style="width: 200px" id="chargeRule"></label>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 130px">客服电话:</label>
                    <div class="layui-input-inline">
                        <label class="layui-form-label2" id="kfdh2"></label>
                    </div>

<!--                    <label class="layui-form-label" style="width: 130px">语音呼叫二维码:</label>-->
<!--                    <div class="layui-input-inline">-->
<!--                        <a class="layui-btn layui-btn-normal layui-btn-sm" id="voiceQrCode">下载</a>-->
<!--                    </div>-->
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 130px">收费二维码:</label>
<!--                    <div class="layui-input-inline">-->
<!--                        <a class="layui-btn layui-btn-normal layui-btn-sm" target="_blank" id="chargeQrCode">下载</a>-->
<!--                    </div>-->

                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <div class="layui-form-label"></div>
                    <div class="layui-form-label">车位名称:</div>
                    <div class="layui-input-inline" >
                        <input class="layui-input" id="lockName" name="lockName" autocomplete="off"
                               placeholder="车位名称">
                    </div>
                    <button class="layui-btn" lay-submit="" lay-filter="queryLock" >查询</button>
                    <div style="padding-left: 140px">
                        <table id="lockTable" lay-filter="lockTable" style="width: 100%;"></table>
                    </div>
                </div>
            </div>

        </form>
    </div>
    <!--设备详情 -->
    <div id="sbqkDiv" style="display: none">
        <form class="layui-form" id="sbqk_form" style="margin-top:1%">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <div class="layui-form-label">车场名称:</div>
                    <div class="layui-input-inline" >
                        <input class="layui-input" name="projectName" autocomplete="off"
                               placeholder="车场名称">
                    </div>
                    <label class="layui-form-label">是否在线:</label>
                    <div class="layui-input-inline" >
                        <select name="isOnline" id="isOnline" lay-filter="isOnline">
                            <option value="">全部</option>
                            <option value="1">是</option>
                            <option value="2">否</option>
                        </select>
                    </div>
                </div>
                <div class='layui-inline' >
                    <button class="layui-btn" lay-submit="" lay-filter="queryDevice" >查询</button>
                </div>
            </div>
        </form>
        <table id="deviceTable" lay-filter="deviceTable" style="width: 100%;"></table>
    </div>
</body>
<div id="qrcodeDiv" style="display: none">
    <form class="layui-form" style="margin-top:5px;margin-left: 10px">
        <input type="hidden" id="qrcodeLockTitle"/>
        <div class="qrcode" style="display:none;text-align: center;margin-top: 1rem;"></div>
        <img class="qrcodeImg" style='border:1px solid red;'/>
        <a target="_blank" class="layui-btn download">点击下载</a>
    </form>
</div>
</html>